import java.util.Scanner;
public class test1 {
    public static void main(String[] args){
        Scanner scanner=new Scanner(System.in);
        int n=scanner.nextInt();
        if(n<1||n>999999){
            System.out.println("输入的数字不符合要求");
                return;
        }
        int steps=0;
        while (n != 1) {
            if (n % 2 == 0) {
                n = n / 2;
            } else {
                n = 3 * n + 1;
            }
            steps++;
        }
 
        System.out.println(steps);
    }
}